<header id="webHeader">
    <div class="left-section mb">
        <a href="/admin/"><h1>{C 'site_name' $appConfigs['site_name']}后台管理系统</h1></a>
    </div>
    <nav class="right-section">
        <ul class="fl nav-top" id="topNav">
            {if in_case_array('member',$priv) || in_case_array('membergroup',$priv) || empty($priv)}
            <li data-type="member"><a class="mch" href="/admin/member/index">会员管理</a></li>
            {/if}
            {if in_case_array('fund',$priv) || empty($priv)}
            <li data-type="fund"><a class="mch" href="/admin/fund/index">资金管理</a></li>
            {/if}
            {if in_case_array('order',$priv) || in_case_array('contract',$priv) || empty($priv)}
            <li data-type="order"><a class="mch" href="/admin/order/index">交易管理</a></li>
            {/if}
            {if (in_case_array('product',$priv)||in_case_array('repertory',$priv)) || empty($priv)}
            <li data-type="product"><a class="mch" href="/admin/product/indexBySale">商品管理</a></li>
            {/if}
            {if in_case_array('sale',$priv) || in_case_array('invoice',$priv) || empty($priv)}
            <li data-type="report"><a class="mch" href="/admin/sale/index">报表管理</a></li>
            {/if}
            {if in_case_array('information',$priv) || in_case_array('notice',$priv) || in_case_array('informationnotice',$priv) || in_case_array('informationad',$priv) || in_case_array('informationsinglepage',$priv) || empty($priv)}
            <li data-type="message"><a class="mch" href="/admin/notice/index">信息管理</a></li>
            {/if}
            {if in_case_array('adminsetting',$priv) || in_case_array('friendlinkcate',$priv)|| in_case_array('friendlink',$priv)||in_case_array('nav',$priv)|| in_case_array('node',$priv) || in_case_array('setting',$priv) || in_case_array('remind',$priv) || in_case_array('remindsms',$priv) ||in_case_array('remindsmstmpl',$priv) || empty($priv)}
            <li data-type="setting"><a class="mch" href="/admin/setting/index">网站设置</a></li>
            {/if}
            {if in_case_array('node',$priv) || in_case_array('role',$priv) || in_case_array('manager',$priv) || empty($priv)}
            <li data-type="system"><a class="mch" href="/admin/role/index">系统管理</a></li>
            {/if}
        </ul>
        <ul class="fr profile">
            <li> <a class="mch" href="{C ('site_url')}" target="_blank" title="商城"><i class="shop ib"></i></a></li>
            <li> <a class="mch" href="{url admin/message/index.shtml}" target="_blank" title="消息"><i class="msg ib"></i></a></li>
            <li class="dropdown"> <a class="mch" href="javascript:;" title="换肤"data-toggle="dropdown" aria-expanded="false"><i class="skin ib"></i></a>
                <ul class="dropdown-menu skin-ul" role="menu" id="changeSkin" data-now="{$skin}">
                    <li>
                        <a href="#" data-val="skin" class="skin" data-color="#418bca"></a>
                      <!--  <a href="#" data-val="skin1" class="skin1" data-color="#ff5798"></a>
                        <a href="#"data-val="skin2"  class="skin2" data-color="#338af1"></a>-->
                        <a href="#"data-val="skin3"  class="skin3" data-color="#1ec575"></a>
                    </li>
                </ul>
            </li>
            <li class="dropdown">
                <a href="#" class="dropdown-toggle mch" data-toggle="dropdown" aria-expanded="false"><i class="user ib"></i>
                    <span style="vertical-align: top;">您好，{$myInfo[name]}</span>
                    <span class="caret"></span></a>
                <ul class="dropdown-menu user" role="menu">
                    <li><a id='js_global_my_info' href="#"><i class="glyphicon glyphicon-user"></i> 个人资料</a></li>
                    <li><a id='js_global_modify_info' href="#"><i class="glyphicon glyphicon-edit"></i> 修改账户</a>
                    </li>
                    <li><a href="{url /admin/login/logout}"><i class="glyphicon glyphicon-off"></i> 退出</a></li>
                </ul>
            </li>
        </ul>
    </nav>
</header>
<!-- template -->
<script id="global_myinfo" type="text/html">
    <div>
        <form id="global_editinfo" class="form-horizontal">
            <div class="row">&nbsp</div>
            <!--tmpl-fieldlist-->
            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 text-right">手机号码 </label>
                <div class="col-sm-4">
                    {$myInfo[mobile]}
                </div>
                <label class="col-sm-2 text-right">创建时间 </label>
                <div class="col-sm-4">
                    {$myInfo[addtime]}
                </div>
            </div>

            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 text-right">用户名 </label>
                <div class="col-sm-4">
                    {$myInfo[username]}
                </div>
                <label class="col-sm-2 text-right">最后更改</label>
                <div class="col-sm-4">
                    {$myInfo[updatetime]}
                </div>
            </div>

            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 text-right">工号 </label>
                <div class="col-sm-4">
                    {$myInfo[jobno]}
                </div>
                <label class="col-sm-2 text-right">登录时间 </label>
                <div class="col-sm-4">
                    {$myInfo[last_login_time]}
                </div>
            </div>

            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 text-right">电子邮箱 </label>
                <div class="col-sm-4">
                    {$myInfo[email]}
                </div>
                <label class="col-sm-2 text-right">登录ip </label>
                <div class="col-sm-4">
                    <?php echo long2ip($myInfo[last_login_ip]); ?>
                </div>
            </div>

            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 text-right">姓名 </label>
                <div class="col-sm-4">
                    {$myInfo[name]}
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 text-right">角色 </label>
                <div class="col-sm-4">
                    {if $myInfo[role_name]}{$myInfo[role_name]}{else}超级管理员{/if}
                </div>
            </div>
        </form>
    </div>
</script>
<!-- template -->
<script id="global_editinfo" type="text/html">
    <div>
        <form id="global_editinfo_form" class="form-horizontal" autocomplete="off">
            <div class="row">&nbsp</div>
            <!--tmpl-fieldlist-->
            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 control-label"><span class="asterisk">*</span>手机号码 </label>

                <div class="col-sm-8">
                    <input dtype="mobile" class="form-control" maxlength="20" name="data[mobile]" placeholder="手机号码"
                           required cname="手机号码" value="{$myInfo[mobile]}"/>
                    <p class="help-block"></p>
                </div>
            </div>

            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 control-label"><span class="asterisk">*</span>用户名 </label>
                <div class="col-sm-8">
                    <input dtype="" class="form-control" maxlength="20" name="data[username]" placeholder="用户名" required
                           cname="用户名" value="{$myInfo[username]}"/>
                    <p class="help-block"></p>
                </div>
            </div>

            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 control-label">工号 </label>
                <div class="col-sm-8">
                    <input dtype="" class="form-control" maxlength="12" name="data[jobno]" placeholder="工号"
                           cname="工号" value="{$myInfo[jobno]}"/>
                    <p class="help-block"></p>
                </div>
            </div>

            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 control-label">电子邮箱 </label>
                <div class="col-sm-8">
                    <input dtype="email" class="form-control" maxlength="35" name="data[email]" placeholder="电子邮箱"
                            cname="电子邮箱" value="{$myInfo[email]}"/>
                    <p class="help-block"></p>
                </div>
            </div>

            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 control-label"><span class="asterisk">*</span>姓名 </label>
                <div class="col-sm-8">
                    <input dtype="" class="form-control" maxlength="16" name="data[name]" placeholder="姓名" required
                           cname="姓名" value="{$myInfo[name]}"/>
                    <p class="help-block"></p>
                </div>
            </div>
            <!-- input -->
            <div class="form-group">
                <label class="col-sm-2 control-label"></label>
                <div class="col-sm-8">
                    <input type="button" class="btn btn-primary" id="extend_modify_password" maxlength="16"
                           name="data[name]" value="修改密码"/>
                </div>
            </div>
        </form>
    </div>
</script>
